#ifndef CONTACT_HPP
#define CONTACT_HPP

#include <QtGui>
#include <QtCore>
#include <QObject>
#include <string>
class contact : public QObject, public QListWidgetItem
{
	Q_OBJECT
public:
	int sockfd;
	std::string 	host_name;
	QString 	hNick;
	QString 	rNick;
	QWidget 	 *chtWin;
	QTextBrowser   	*recMess;
	QLineEdit	*sendMess;
	QVBoxLayout 	*chtLayout;
	pthread_t	p_read;

	contact (std::string = "127.0.0.1", QString = "remote nick",
		       	int = -2, QString = "host nick");
public:
	void* readMessage();
	void connectTo();
	
private slots:
	void insertMess();
};
#endif //CONTACT_HPP
